//
//  ZBNetWorkTool.m
//  11-21微博第一天
//
//  Created by mac on 15/11/27.
//  Copyright © 2015年 zhouxubin. All rights reserved.
//

#import "ZBNetWorkTool.h"

@implementation ZBNetWorkTool

static ZBNetWorkTool *_instance;
+ (instancetype)sharedNetWorkTool {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [[self alloc] initWithBaseURL:nil];
        _instance.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/plain",@"text/html", nil];
        /*
         [manager.requestSerializer willChangeValueForKey:@"timeoutInterval"];
         manager.requestSerializer.timeoutInterval = 10.f;
         [manager.requestSerializer didChangeValueForKey:@"timeoutInterval"];
         */
        [_instance.requestSerializer willChangeValueForKey:@"timeoutInterval"];
        _instance.requestSerializer.timeoutInterval = 15.0;
        [_instance.requestSerializer didChangeValueForKey:@"timeoutInterval"];

    });
    return _instance;
}

@end
